package com.tang.model.decorator.v1;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/8/19 22:07
 * @Desc 装饰器模式
 * @Remarks
 */
public class DecoratorTest {
    public static void main(String[] args) {
        Pancakes pancakes = new Pancakes();
        System.out.println("品名:" + pancakes.getMsg() + ",价格：" + pancakes.getPrice());

        PancakesWithEgg pancakesWithEgg = new PancakesWithEgg();
        System.out.println("品名:" + pancakesWithEgg.getMsg() + ",价格：" + pancakesWithEgg.getPrice());


        PancakesWithEggAndSausage pancakesWithEggAndSausage = new PancakesWithEggAndSausage();
        System.out.println("品名:" + pancakesWithEggAndSausage.getMsg() + ",价格：" + pancakesWithEggAndSausage.getPrice());
    }

}
